#ifndef ValueList_H
#define ValueList_H


#include "Common.h"

namespace HitoriGenerator {
class ValueList {
public:	
	void add_to_row(const unsigned short index, const unsigned short value);
	void add_to_column(const unsigned short index, const unsigned short value);
	void add(const unsigned short index, const unsigned short value);
	
	void remove_from_row(const unsigned short index, const unsigned short value);
	void remove_from_column(const unsigned short index, const unsigned short value);
	void remove(const unsigned short index, const unsigned short value);
	
	bool is_in_row(const unsigned short index, const unsigned short value) const;
	bool is_in_column(const unsigned short index, const unsigned short value) const;
	
	std::shared_ptr<std::set<unsigned short>> get_rowList(const unsigned short index) const;
	std::shared_ptr<std::set<unsigned short>> get_columnList(const unsigned short index) const;
	unsigned short get_row_of(const unsigned short index) const;
	unsigned short get_column_of(const unsigned short index) const;
	
protected:
	std::unique_ptr<std::vector<std::shared_ptr<std::set<unsigned short>>>> rowList, columnList;
};
}


#endif